home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 6
/
CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso
/
cucd
/
prog
/
mui
/
muibuilder
/
mb
/
gcc
/
inline
/
muimaster.h
Wrap
C/C++ Source or Header
|
1995-06-22
|
7KB
|
289 lines
#ifndef _INLINE_MUIMASTER_H
#define _INLINE_MUIMASTER_H
#include <sys/cdefs.h>
#include <inline/stubs.h>
__BEGIN_DECLS
#ifndef BASE_EXT_DECL
#define BASE_EXT_DECL /*extern struct Library* MUIMasterBase;*/
#endif
#ifndef BASE_PAR_DECL
#define BASE_PAR_DECL
#define BASE_PAR_DECL0 void
#endif
#ifndef BASE_NAME
#define BASE_NAME MUIMasterBase
#endif
extern struct Library* MUIMasterBase;
__inline
APTR MUI_AllocAslRequest( BASE_PAR_DECL unsigned long type, struct TagItem *tagList)
{
BASE_EXT_DECL
register APTR res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register unsigned long d0 __asm("d0") = type;
register struct TagItem* a0 __asm("a0") = tagList;
__asm volatile ("jsr a6@(-0x30)"
: "=r" (res)
: "r" (a6), "r" (d0), "r" (a0)
: "d0","d1", "a0", "a1", "memory" );
return res;
}
APTR MUI_AllocAslRequestTags(ULONG type, Tag tag1, ...);
__inline
BOOL MUI_AslRequest( BASE_PAR_DECL APTR requester, struct TagItem *tagList)
{
BASE_EXT_DECL
register BOOL res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register APTR a0 __asm("a0") = requester;
register struct TagItem* a1 __asm("a1") = tagList;
__asm volatile ("
jsr a6@(-0x36)"
: "=r" (res)
: "r" (a6), "r" (a0), "r" (a1)
: "d0", "d1", "a0", "a1" );
return res;
}
BOOL MUI_AslRequestTags(APTR req, Tag tag1, ...);
__inline
struct MUI_CustomClass*
MUI_CreateCustomClass( BASE_PAR_DECL struct Library *base, char *supername, struct MUI_CustomClass *supermcc, int datasize, APTR dispatcher)
{
BASE_EXT_DECL
register struct MUI_CustomClass* res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register struct Library* a0 __asm("a0") = base;
register char* a1 __asm("a1") = supername;
register struct MUI_CustomClass* a2 __asm("a2") = supermcc;
register int d0 __asm("d0") = datasize;
register APTR a3 __asm("a3") = dispatcher;
__asm volatile ("
jsr a6@(-0x6c)"
: "=r" (res)
: "r" (a6), "r" (a0), "r" (a1), "r" (a2), "r" (d0), "r" (a3)
: "d0", "d1", "a0", "a1", "a2", "a3" );
return res;
}
__inline
BOOL MUI_DeleteCustomClass( BASE_PAR_DECL struct MUI_CustomClass* mcc)
{
BASE_EXT_DECL
register BOOL res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register struct MUI_CustomClass* a0 __asm("a0") = mcc;
__asm volatile ("
jsr a6@(-0x72)"
: "=r" (res)
: "r" (a6), "r" (a0)
: "d0", "d1", "a0", "a1" );
return res;
}
__inline void MUI_DisposeObject( BASE_PAR_DECL Object *obj)
{
BASE_EXT_DECL
register res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register Object* a0 __asm("a0") = obj;
__asm volatile ("
jsr a6@(-0x24)"
: "=r" (res)
: "r" (a6), "r" (a0)
: "d0", "d1", "a0", "a1" );
}
__inline LONG MUI_Error( BASE_PAR_DECL0 )
{
BASE_EXT_DECL
register LONG res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
__asm volatile ("
jsr a6@(-0x42)"
: "=r" (res)
: "r" (a6)
: "d0", "d1", "a0", "a1" );
return res;
}
__inline void MUI_FreeAslRequest( BASE_PAR_DECL APTR requester)
{
BASE_EXT_DECL
register res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register APTR a0 __asm("a0") = requester;
__asm volatile ("
jsr a6@(-0x3c)"
: "=r" (res)
: "r" (a6), "r" (a0)
: "d0", "d1", "a0", "a1" );
}
__inline void MUI_FreeClass( BASE_PAR_DECL struct IClass *classptr)
{
BASE_EXT_DECL
register res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register struct IClass* a0 __asm("a0")=classptr;
__asm volatile ("
jsr a6@(-0x54)"
: "=r" (res)
: "r" (a6), "r" (a0)
: "d0", "d1", "a0", "a1" );
}
__inline struct IClass* MUI_GetClass( BASE_PAR_DECL char *classname)
{
BASE_EXT_DECL
register struct IClass* res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register char* a0 __asm("a0")=classname;
__asm volatile ("
jsr a6@(-0x4e)"
: "=r" (res)
: "r" (a6), "r" (a0)
: "d0", "d1", "a0", "a1" );
return res;
}
__inline Object* MUI_MakeObjectA( BASE_PAR_DECL LONG type, ULONG *params)
{
BASE_EXT_DECL
register Object* res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register LONG d0 __asm("d0")=type;
register ULONG* a0 __asm("a0")=params;
__asm volatile ("
jsr a6@(-0x78)"
: "=r" (res)
: "r" (a6), "r" (d0), "r" (a0)
: "d0", "d1", "a0", "a1" );
return res;
}
Object *MUI_MakeObject(LONG type, ...);
__inline Object* MUI_NewObjectA( BASE_PAR_DECL char *classname, struct TagItem *tags)
{
BASE_EXT_DECL
register Object* res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register char* a0 __asm("a0") = classname;
register struct TagItem* a1 __asm("a1")=tags;
__asm volatile ("
jsr a6@(-0x1e)"
: "=r" (res)
: "r" (a6), "r" (a0), "r" (a1)
: "d0", "d1", "a0", "a1" );
return res;
}
Object* MUI_NewObject(char *class, Tag tag1, ...);
__inline void MUI_Redraw( BASE_PAR_DECL Object *obj, ULONG flags)
{
BASE_EXT_DECL
register res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register Object * a0 __asm("a0")=obj;
register ULONG d0 __asm("d0")=flags;
__asm volatile ("
jsr a6@(-0x66)"
: "=r" (res)
: "r" (a6), "r" (a0), "r" (d0)
: "d0", "d1", "a0", "a1" );
}
__inline void MUI_RejectIDCMP( BASE_PAR_DECL Object *obj, ULONG flags)
{
BASE_EXT_DECL
register res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register Object* a0 __asm("a0")=obj;
register ULONG d0 __asm("d0")=flags;
__asm volatile ("
jsr a6@(-0x60)"
: "=r" (res)
: "r" (a6), "r" (a0), "r" (d0)
: "d0", "d1", "a0", "a1" );
}
__inline LONG MUI_RequestA( BASE_PAR_DECL APTR app, APTR win,
LONGBITS flags, char *title,char *gadgets,char *format,APTR params)
{
BASE_EXT_DECL
register LONG res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register APTR d0 __asm("d0")=app;
register APTR d1 __asm("d1")=win;
register LONGBITS d2 __asm("d2")=flags;
register char * a0 __asm("a0")=title;
register char * a1 __asm("a1")=gadgets;
register char * a2 __asm("a2")=format;
register APTR a3 __asm("a3")=params;
__asm volatile ("
jsr a6@(-0x2a)"
: "=r" (res)
: "r" (a6), "r" (d0), "r" (d1), "r" (d2), "r" (a0), "r" (a1), "r" (a2), "r" (a3)
: "d0", "d1", "a0", "a1", "d2", "a2", "a3" );
return res;
}
LONG MUI_Request(APTR app, APTR win, LONGBITS flags, char *title, char *gadgets, char *format, ...);
__inline void MUI_RequestIDCMP( BASE_PAR_DECL Object *obj, ULONG flags)
{
BASE_EXT_DECL
register res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register Object * a0 __asm("a0")=obj;
register ULONG d0 __asm("d0")=flags;
__asm volatile ("
jsr a6@(-0x5a)"
: "=r" (res)
: "r" (a6), "r" (a0), "r" (d0)
: "d0", "d1", "a0", "a1" );
}
__inline LONG MUI_SetError( BASE_PAR_DECL LONG num)
{
BASE_EXT_DECL
register LONG res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register LONG d0 __asm("d0")=num;
__asm volatile ("
jsr a6@(-0x48)"
: "=r" (res)
: "r" (a6), "r" (d0)
: "d0", "d1", "a0", "a1" );
return res;
}
#undef BASE_EXT_DECL
#undef BASE_PAR_DECL
#undef BASE_PAR_DECL0
#undef BASE_NAME
__END_DECLS
#endif /* _INLINE_MUIMASTER_H */